<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include  file="/jsps/front/common/taglibs.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>网络交易系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<c:url value="/jsps/front/css/head.css"/>">
    
    <script type="text/javascript">
	    
	      function logout(){
	         if(confirm('尊敬的${loginedCustomer.userName},您真的要离开系统吗？')){
	            location.href="<c:url value="/securityMgr?act=logout"/>";
	         }
	      }
	      
	      function register(){
	         location.href="<c:url value="/jsps/front/customer/register_customer.jsp"/>";
	      }
	      
	      function login(){
	         location.href="<c:url value="/jsps/front/customer/login.jsp"/>";
	      }
		function $(id){
        	return document.getElementById(id).value;
        };
        function go(){
        	var key=$('key');
        	//alert(key);
        	 document.forms[0].action=document.forms[0].action+'&key='+key;
	         document.forms[0].submit();
        }
 	</script>

  </head>
  
  <body>
     <DIV class=head_container>
    	<DIV class=head_welcome  >
			<DIV class=little_navi>
				<div style="float:left;BACKGROUND: #f9faed; ">
			            <c:if test="${not empty loginedCustomer}">
							<SPAN class=head_toutext id=nickname > 
								您好,${loginedCustomer.userName} 
				    			[<SPAN onclick="logout();" style="cursor:hand;color:green">退出系统</SPAN>]
							</SPAN>
			            </c:if>
			            <c:if test="${empty loginedCustomer}">
			                 [<SPAN onclick="register();" style="cursor:hand;color:green"> 注册新用户 </SPAN>]
			                 [<SPAN onclick="login();" style="cursor:hand;color:green"> 系统登陆 </SPAN>]
			            </c:if>
				</div>
						
				        <DIV class=little_n> 
								| <A href="<c:url value="/goodMgr?act=main"/>" target=blank name=>返回首页</A> 
						</DIV>
						<DIV class=little_n> 
								| <A href="<c:url value="/goodMgr?act=orderList&name=${loginedCustomer.userName}"/>" 
								        target='mainFrame' name=>我的订单</A> 
						</DIV>
						<DIV class=little_n> 
								| <A href="<c:url value="/securityMgr?act=toMyInfo"/>" target=_blank name=>会员中心</A> 
						</DIV>
						
						<DIV class="cart gray4012">
							<A href="<c:url value="jsps/front/customer/show_shoppingcar.jsp"/>">购物车</A>
						</DIV>
			</DIV>	
    	</DIV>
    	
    	
    	<DIV class=head_head_list >
			<DIV class=head_head_list_left>
				<SPAN class=head_logo> 
					<A href="<c:url value="/" />" name=backto>
						<IMG src="<c:url value="/jsps/front/images/head/1.jpg" />"> 
					</A> 
				</SPAN>
			</DIV>
	<form action="<c:url value="/searchMgr?act=getByKey"/>" method="post" name=searchForm>
		<div id=head_search_div>
					<INPUT class=head_search_kuang id="key" name="key" value="${key }">
					<SPAN class=head_button >
						<A target=blank name=mydangdang>
						<img onclick="document.searchForm.submit();"
						     src="<c:url value="/jsps/front/images/head/search.jpg"/>"> </A> 
					</SPAN>
		</div>
    </form>
	<DIV class=head_lianjie>
					<IMG class=head_lianjie1 src="<c:url value="/" />">
					<A href="<c:url value="/" />" name=backtobook><IMG 
						src="<c:url value="/" />" border=0></A>
				</DIV>
			
	</DIV>
		
		<DIV class=head_search_bg></DIV>
	</DIV>
  </body>
</html>
